Location determination method and electronic device for supporting same

ABSTRACT

An electronic device may include a magnetic sensor and at least one processor operatively connected with the magnetic sensor, wherein the at least one processor may be configured to: collect a plurality of pieces of path data based on first magnetic data related to a plurality of movements of the electronic device, by using the magnetic sensor; identify a plurality of pieces of second magnetic data, which have at least a predetermined level of mutual similarity, from among the plurality of pieces of path data; determine, to be an intersection area related to the plurality of movements of the electronic device, an area range in which the plurality of pieces of second magnetic data are collected; determine, on the basis of the intersection area, a first space and a second space related to the plurality of movements of the electronic device; and determine, on the basis of the third magnetic data acquired by using the magnetic sensor, the space in which the electronic device is located from among the first space and the second space.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/KR2021/002761, designating the United States, filed on Mar. 5, 2021,in the Korean Intellectual Property Receiving Office and claimingpriority to Korean Patent Application No. 10-2020-0027954, filed on Mar.5, 2020, the disclosures of which are incorporated by reference hereinin their entireties.

BACKGROUND Field

Various example embodiments disclosed herein relate to a locationdetermination method and/or an electronic device supporting the same.

Description of Related Art

Electronic devices provide various functions or services based onconvergence of various kinds of information/communication technologies,also referred to as digital convergence. For example, an electronicdevice may track the position of the electronic device (or user holdingthe electronic device) with regard to an indoor space, and may providean event related to the corresponding position, thereby supporting aposition-based service.

In connection with position tracking regarding an indoor space, anelectronic device may use radio signals (for example, cellular signals,Wi-Fi signals, or Bluetooth signals) received in the indoor space. Forexample, the electronic device may divide the indoor space into multiplecells, may record characteristics of radio signals received inrespective cells as feature points related to the corresponding cells,and may determine the degree of similarity between characteristics ofradio signals received in a specific cell and feature points recordedwith regard to the corresponding cell, thereby tracking the position ofthe electronic device.

Based thereon, construction of a radio map reflecting radio signalscharacteristics regarding the multiple cells is a prerequisite for aradio signal-based position tracking scheme, and construction of such aradio map may involve survey (or calibration) costs for collecting radiosignals. In addition, if a base station or an access point related toradio signals undergoes a change (for example, replacement ordisplacement), maintenance/repair costs for updating the radio map, forexample, may be incurred.

SUMMARY

Various example embodiments disclosed herein may provide a positiondetermination method and an electronic device supporting the same,wherein the position of an electronic device existing in an indoor spacecan be tracked without constructing a map regarding the indoor space.

An electronic device according to an example embodiment may include amagnetic sensor and at least one processor operatively connected withthe magnetic sensor.

According to an example embodiment, the processor (at least oneprocessor) may collect multiple pieces of path data based on at leastfirst magnetic data related to multiple movements of the electronicdevice, by using at least the magnetic sensor, identify multiple piecesof second magnetic data, which are similar to each other at apredetermined level or higher, from among the multiple pieces of pathdata, determine an area range, in which the multiple pieces of secondmagnetic data are collected, to be an intersection area related to themultiple movements of the electronic device, determine a first space anda second space related to the multiple movements of the electronicdevice based on at least the intersection area, and determine a space,in which the electronic device is located, among the first space and thesecond space based on at least third magnetic data acquired using atleast the magnetic sensor.

A positioning method by an electronic device according to an exampleembodiment may include collecting multiple pieces of path data based onfirst magnetic data related to multiple movements of the electronicdevice by using a magnetic sensor, identifying multiple pieces of secondmagnetic data, which are similar to each other at a predetermined levelor higher, from among the multiple pieces of path data, determining anarea range, in which the multiple second magnetic data are collected, tobe an intersection area related to the multiple movements of theelectronic device, determining a first space and a second space relatedto the multiple movements of the electronic device based on theintersection area, and determining a space, in which the electronicdevice is located, among the first space and the second space based onthird magnetic data acquired using the magnetic sensor.

According to various example embodiments, a position tracking platformnot requiring construction of a map regarding an indoor space may beprovided.

Various other advantageous effects identified explicitly or implicitlythrough the disclosure may be provided.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects, features and advantages of certainembodiments of the present disclosure will be more apparent from thefollowing detailed description, taken in conjunction with theaccompanying drawings, in which:

FIG. 1 illustrates an electronic device in a network environmentaccording to an example embodiment;

FIG. 2 illustrates an operating environment of an electronic deviceaccording to an example embodiment;

FIG. 3 illustrates various traveling paths of an electronic devicemoving between designated zones in an indoor space according to anexample embodiment;

FIG. 4 illustrates the form of data collection with regard to atraveling path of an electronic device according to an exampleembodiment;

FIG. 5A illustrates an example of a coordinate direction with referenceto an electronic device according to an example embodiment;

FIG. 5B illustrates an example of a virtual marker according to anexample embodiment;

FIG. 6 illustrates the distribution form of pieces of data collected ina first zone and a second zone in an indoor space according to anexample embodiment;

FIG. 7 illustrates the distribution form of pieces of data collectedfrom each of various traveling paths of an electronic device accordingto an example embodiment;

FIG. 8 illustrates a similarity relation between pieces of datacollected from each of various traveling paths of an electronic deviceaccording to an example embodiment;

FIG. 9 illustrates the form of spatial division of various travelingpaths of an electronic device according to an example embodiment;

FIG. 10 illustrates the form of filtering pieces of data collected fromeach of various traveling paths of an electronic device according to anexample embodiment;

FIG. 11 illustrates the form of filtering pieces of data collected fromeach of various traveling paths of an electronic device according toanother example embodiment;

FIG. 12 illustrates the distribution form of filtered pieces of dataaccording to an example embodiment; and

FIG. 13 illustrates a positioning method by an electronic deviceaccording to an example embodiment.

In connection with the description of the drawings, the same referencenumerals may be assigned to the same or corresponding elements.

DETAILED DESCRIPTION

Hereinafter, various example embodiments of the present disclosure aredisclosed with reference to the accompanying drawings. However, thepresent disclosure is not intended to be limited by the variousembodiments of the present disclosure to a specific embodiment and it isintended that the present disclosure covers all modifications,equivalents, and/or alternatives of the present disclosure provided theycome within the scope of the appended claims and their equivalents. Eachembodiment herein may be used in combination with any otherembodiment(s).

FIG. 1 illustrates an electronic device in a network environmentaccording to an example embodiment.

Referring to FIG. 1 , the electronic device 101 in the networkenvironment 100 may communicate with an electronic device 102 via afirst network 198 (e.g., a short-range wireless communication network),or an electronic device 104 or a server 108 via a second network 199(e.g., a long-range wireless communication network). According to anembodiment, the electronic device 101 may communicate with theelectronic device 104 via the server 108. According to an embodiment,the electronic device 101 may include a processor 120, memory 130, aninput device 150, a sound output device 155, a display device 160, anaudio module 170, a sensor module 176, an interface 177, a haptic module179, a camera module 180, a power management module 188, a battery 189,a communication module 190, a subscriber identification module (SIM)196, or an antenna module 197. In some embodiments, at least one (e.g.,the display device 160 or the camera module 180) of the components maybe omitted from the electronic device 101, or one or more othercomponents may be added in the electronic device 101. In someembodiments, some of the components may be implemented as singleintegrated circuitry. For example, the sensor module 176 (e.g., afingerprint sensor, an iris sensor, or an illuminance sensor) may beimplemented as embedded in the display device 160 (e.g., a display).

The processor 120 may execute, for example, software (e.g., a program140) to control at least one other component (e.g., a hardware orsoftware component) of the electronic device 101 coupled with theprocessor 120, and may perform various data processing or computation.According to one embodiment, as at least part of the data processing orcomputation, the processor 120 may load a command or data received fromanother component (e.g., the sensor module 176 or the communicationmodule 190) in volatile memory 132, process the command or the datastored in the volatile memory 132, and store resulting data innon-volatile memory 134 (which may include internal memory 136 and/orexternal memory 138). According to an embodiment, the processor 120 mayinclude a main processor 121 (e.g., a central processing unit (CPU) oran application processor (AP)), and an auxiliary processor 123 (e.g., agraphics processing unit (GPU), an image signal processor (ISP), asensor hub processor, or a communication processor (CP)) that isoperable independently from, or in conjunction with, the main processor121. Additionally or alternatively, the auxiliary processor 123 may beadapted to consume less power than the main processor 121, or to bespecific to a specified function. The auxiliary processor 123 may beimplemented as separate from, or as part of the main processor 121. Eachprocessor herein includes processing circuitry, and each processing unitherein includes processing circuitry.

The auxiliary processor 123 may control at least some of functions orstates related to at least one component (e.g., the display device 160,the sensor module 176, or the communication module 190) among thecomponents of the electronic device 101, instead of the main processor121 while the main processor 121 is in an inactive (e.g., sleep) state,or together with the main processor 121 while the main processor 121 isin an active state (e.g., executing an application). According to anembodiment, the auxiliary processor 123 (e.g., an image signal processoror a communication processor) may be implemented as part of anothercomponent (e.g., the camera module 180 or the communication module 190)functionally related to the auxiliary processor 123. Each “module”herein may comprise circuitry.

The memory 130 may store various data used by at least one component(e.g., the processor 120 or the sensor module 176) of the electronicdevice 101. The various data may include, for example, software (e.g.,the program 140) and input data or output data for a command relatedthererto. The memory 130 may include the volatile memory 132 or thenon-volatile memory 134.

The program 140 may be stored in the memory 130 as software, and mayinclude, for example, an operating system (OS) 142, middleware 144, oran application 146.

The input device 150 may receive a command or data to be used by othercomponent (e.g., the processor 120) of the electronic device 101, fromthe outside (e.g., a user) of the electronic device 101. The inputdevice 150 may include, for example, a microphone, a mouse, a keyboard,or a digital pen (e.g., a stylus pen).

The sound output device 155 may output sound signals to the outside ofthe electronic device 101. The sound output device 155 may include, forexample, a speaker or a receiver. The speaker may be used for generalpurposes, such as playing multimedia or playing record, and the receivermay be used for an incoming calls. According to an embodiment, thereceiver may be implemented as separate from, or as part of the speaker.

The display device 160 may visually provide information to the outside(e.g., a user) of the electronic device 101. The display device 160 mayinclude, for example, a display, a hologram device, or a projector andcontrol circuitry to control a corresponding one of the display,hologram device, and projector. According to an embodiment, the displaydevice 160 may include touch circuitry adapted to detect a touch, orsensor circuitry (e.g., a pressure sensor) adapted to measure theintensity of force incurred by the touch.

The audio module 170 may convert a sound into an electrical signal andvice versa. According to an embodiment, the audio module 170 may obtainthe sound via the input device 150, or output the sound via the soundoutput device 155 or a headphone of an external electronic device (e.g.,an electronic device 102) directly (e.g., wiredly) or wirelessly coupledwith the electronic device 101.

The sensor module 176 may detect an operational state (e.g., power ortemperature) of the electronic device 101 or an environmental state(e.g., a state of a user) external to the electronic device 101, andthen generate an electrical signal or data value corresponding to thedetected state. According to an embodiment, the sensor module 176 mayinclude, for example, a gesture sensor, a gyro sensor, an atmosphericpressure sensor, a magnetic sensor, an acceleration sensor, a gripsensor, a proximity sensor, a color sensor, an infrared (IR) sensor, abiometric sensor, a temperature sensor, a humidity sensor, or anilluminance sensor.

The interface 177 may support one or more specified protocols to be usedfor the electronic device 101 to be coupled with the external electronicdevice (e.g., the electronic device 102) directly (e.g., wiredly) orwirelessly. According to an embodiment, the interface 177 may include,for example, a high definition multimedia interface (HDMI), a universalserial bus (USB) interface, a secure digital (SD) card interface, or anaudio interface.

A connecting terminal 178 may include a connector via which theelectronic device 101 may be physically connected with the externalelectronic device (e.g., the electronic device 102). According to anembodiment, the connecting terminal 178 may include, for example, a HDMIconnector, a USB connector, a SD card connector, or an audio connector(e.g., a headphone connector).

The haptic module 179 may convert an electrical signal into a mechanicalstimulus (e.g., a vibration or a movement) or electrical stimulus whichmay be recognized by a user via his tactile sensation or kinestheticsensation. According to an embodiment, the haptic module 179 mayinclude, for example, a motor, a piezoelectric element, or an electricstimulator.

The camera module 180 may capture a still image or moving images.According to an embodiment, the camera module 180 may include one ormore lenses, image sensors, image signal processors, or flashes.

The power management module 188 may manage power supplied to theelectronic device 101. According to one embodiment, the power managementmodule 188 may be implemented as at least part of, for example, a powermanagement integrated circuit (PMIC).

The battery 189 may supply power to at least one component of theelectronic device 101. According to an embodiment, the battery 189 mayinclude, for example, a primary cell which is not rechargeable, asecondary cell which is rechargeable, or a fuel cell.

The communication module 190 (including communication circuitry) maysupport establishing a direct (e.g., wired) communication channel or awireless communication channel between the electronic device 101 and theexternal electronic device (e.g., the electronic device 102, theelectronic device 104, or the server 108) and performing communicationvia the established communication channel. The communication module 190may include one or more communication processors that are operableindependently from the processor 120 (e.g., the application processor(AP)) and supports a direct (e.g., wired) communication or a wirelesscommunication. According to an embodiment, the communication module 190may include a wireless communication module 192 (e.g., a cellularcommunication module, a short-range wireless communication module, or aglobal navigation satellite system (GNSS) communication module) or awired communication module 194 (e.g., a local area network (LAN)communication module or a power line communication (PLC) module). Acorresponding one of these communication modules may communicate withthe external electronic device via the first network 198 (e.g., ashort-range communication network, such as Bluetooth™, wireless-fidelity(Wi-Fi) direct, or infrared data association (IrDA)) or the secondnetwork 199 (e.g., a long-range communication network, such as acellular network, the Internet, or a computer network (e.g., LAN or widearea network (WAN)). These various types of communication modules may beimplemented as a single component (e.g., a single chip), or may beimplemented as multi components (e.g., multi chips) separate from eachother. The wireless communication module 192 may identify andauthenticate the electronic device 101 in a communication network, suchas the first network 198 or the second network 199, using subscriberinformation (e.g., international mobile subscriber identity (IMSI))stored in the subscriber identification module 196 (includingcommunication circuitry).

The antenna module 197 (including an antenna) may transmit or receive asignal or power to or from the outside (e.g., the external electronicdevice) of the electronic device 101. According to an embodiment, theantenna module 197 may include an antenna including a radiating elementcomposed of a conductive material or a conductive pattern formed in oron a substrate (e.g., PCB). According to an embodiment, the antennamodule 197 may include a plurality of antennas. In such a case, at leastone antenna appropriate for a communication scheme used in thecommunication network, such as the first network 198 or the secondnetwork 199, may be selected, for example, by the communication module190 (e.g., the wireless communication module 192) from the plurality ofantennas. The signal or the power may then be transmitted or receivedbetween the communication module 190 and the external electronic devicevia the selected at least one antenna. According to an embodiment,another component (e.g., a radio frequency integrated circuit (RFIC))other than the radiating element may be additionally formed as part ofthe antenna module 197.

At least some of the above-described components may be coupled mutuallyand communicate signals (e.g., commands or data) therebetween via aninter-peripheral communication scheme (e.g., a bus, general purposeinput and output (GPIO), serial peripheral interface (SPI), or mobileindustry processor interface (MIPI)).

According to an embodiment, commands or data may be transmitted orreceived between the electronic device 101 and the external electronicdevice 104 via the server 108 coupled with the second network 199. Eachof the electronic devices 102 and 104 may be a device of a same type as,or a different type, from the electronic device 101. According to anembodiment, all or some of operations to be executed at the electronicdevice 101 may be executed at one or more of the external electronicdevices 102, 104, or 108. For example, if the electronic device 101should perform a function or a service automatically, or in response toa request from a user or another device, the electronic device 101,instead of, or in addition to, executing the function or the service,may request the one or more external electronic devices to perform atleast part of the function or the service. The one or more externalelectronic devices receiving the request may perform the at least partof the function or the service requested, or an additional function oran additional service related to the request, and transfer an outcome ofthe performing to the electronic device 101. The electronic device 101may provide the outcome, with or without further processing of theoutcome, as at least part of a reply to the request. To that end, acloud computing, distributed computing, or client-server computingtechnology may be used, for example.

FIG. 2 illustrates an operating environment of an electronic deviceaccording to an embodiment.

Referring to FIG. 2 , a processor (e.g., the processor 120 of FIG. 1 )of an electronic device (e.g., the electronic device 101 of FIG. 1 )according to an embodiment may be configured to determine the locationof the electronic device 101 (or a user who possesses the electronicdevice 101) with respect to a designated indoor space 200 (e.g., anindoor space configured in the electronic device 101 through anapplication for supporting a location-based service). In this regard,the processor 120 may be configured to collect multiple pieces of data,which are acquired in the indoor space 200, as background data during adesignated period. For example, the processor 120 may be configured tocollect data with respect to each of multiple paths of the electronicdevice 101 moving between a first zone and a second zone within apreconfigured indoor space. For example, the processor 120 may beconfigured to collect pieces of data, which are acquired on a first pathof the electronic device 101 at a designated time interval, as firstpath data, and similarly, may collect pieces of data, which are acquiredon a second path of the electronic device 101 at the designated timeinterval, as second path data, so as to collect multiple pieces of dataincluding the first path data and the second path data.

In an embodiment, the processor 120 may be configured to determine anintersection area for the multiple paths based on at least multiplepieces of data collected with respect to each of the multiple paths ofthe electronic device 101. For example, the processor 120 may beconfigured to identify multiple pieces of first data having asimilarity, which is equal to or greater than a designated level,between pieces of data configuring the first path data and pieces ofdata configuring the second path data, and determine an area within theindoor space, in which the multiple pieces of first data are collected,as an intersection area 210 for the first path and the second path ofthe electronic device 101.

In an embodiment, the processor 120 may be configured to spatiallypartition the multiple pieces of data collected from each of themultiple paths of the electronic device 101 based on at least thedetermined intersection area 210. In this regard, the processor 120 maybe configured to process the multiple pieces of collected data. Forexample, the processor 120 may be configured to process magnetic data,which is collected using a magnetic sensor (e.g., a magnetic sensorincluding the sensor module 176 of FIG. 1 ), into a magnetic fieldcomponent in the X-axis direction (e.g., X direction of FIG. 5A), amagnetic field component in the Y-axis direction (e.g., Y direction ofFIG. 5A), and a magnetic field component in the Z-axis direction (e.g.,Z direction in FIG. 5A) with reference to the electronic device 101. Theprocessor 120 may be configured to spatially arrange the processedmagnetic data on a vector space (e.g., a vector space corresponding tothe indoor space 200) represented by the X-axis, Y-axis, and Z-axis, andmay be configured to group multiple pieces of second data havingmutually identical and/or similar first distribution characteristics(e.g., directionality or adjacency of spatially arranged pieces of data)with reference to the intersection area 210 (or multiple pieces of firstdata corresponding to the intersection area 210) into a first group andto group multiple pieces of third data having a second distributioncharacteristic different from the first distribution characteristic intoa second group. The processor 120 may be configured to determine a rangeof an area, in which multiple pieces of second data included in thefirst group are collected, as a first space 220 in the indoor space 200,and similarly determine a range of an area, in which multiple pieces ofthird data included in the second group are collected, as a second space230 in the indoor space 200.

In an embodiment, after determination of the first space 220 and thesecond space 230, the processor 120 may be configured to determine aspace, in which the electronic device 101 is located within the indoorspace 200, based on at least data acquired by the electronic device 101.For example, when the acquired data is similar to at least part of themultiple pieces of second data corresponding to the first space 220 at adesignated level or higher, the processor 120 may be configured todetermine that the electronic device 101 is located in the first space220 within the indoor space 200. The processor 120 may be configured toprovide an event configured for the first space 220 in which theelectronic device 101 is located, in response to determining thelocation of the electronic device 101. For example, the processor 120may be configured to output an alarm based on voice, text, image, or acombination thereof. As another example, the processor 120 may beconfigured to control a function (e.g., turn on a light) of an externalelectronic device existing within the first space 220 in which theelectronic device 101 is located, among at least one external electronicdevice constructing an Internet of Things (IoT) environment with theelectronic device 101.

Hereinafter, referring to FIGS. 3 to 12 , based on spatial partition ofmultiple pieces of data collected from multiple paths of the electronicdevice 101, various embodiments related to determining the location ofthe electronic device 101 in the indoor space 200 will be described.

FIG. 3 illustrates various traveling paths of an electronic devicemoving between designated zones in an indoor space according to anembodiment, and FIG. 4 illustrates the form of data collection withregard to a traveling path of an electronic device according to anembodiment.

Referring to FIGS. 3 and 4 , a processor (e.g., the processor 120 ofFIG. 1 ) of an electronic device (e.g., the electronic device 101 ofFIG. 1 ) according to an embodiment may be configured to collect piecesof data from each of multiple paths 310, 320, and 330 of the electronicdevice 101 moving between a first zone and a second zone within anindoor space 300 for a designated period. For example, sensinginformation, which is acquired using at least one of an accelerationsensor and a gyro sensor included in a sensor module (e.g., the sensormodule 176 of FIG. 1 , which includes a sensor) in the first zone or thesecond zone during the designated period, indicates the movement of theelectronic device 101, the processor 120 may be configured to collectdata from a first time at which the movement is detected to a secondtime at which the movement is not detected. In this regard, the movementof the electronic device 101 may include the travel of the electronicdevice 101, and data collected from a first time at which the movementis detected to a second time at which the movement is not detected maybe understood as path data relating to the continuous travel of theelectronic device 101.

According to an embodiment, the processor 120 may be configured tocollect path data at a designated time interval with respect to each ofthe multiple paths 310, 320, and 330 of the electronic device 101.Referring to FIG. 4 , taking a first path 410 of the electronic device101 in an indoor space 400 as an example, the processor 120 may beconfigured to collect, based on at least a time interval correspondingto a designated sampling rate, data for each of multiple points T1 toT10 on the first path 410 according to the time interval, and aggregatethe collected data as first path data.

According to various embodiments, the processor 120 may be configured topreprocess the path data collected with respect to each of the multiplepaths 310, 320, and 330 of the electronic device 101. For example, theprocessor 120 may be configured to perform preprocessing of removing thesample average of the collected path data or reducing the variation ofthe collected path data by using at least a finite impulse response(FIR) filter. Alternatively, when the electronic device 101 movesmultiple times on the same path, the processor 120 may be configured topreprocess the collected path data based on a dynamic time warping orinterpolation algorithm in order to compensate for the collection ofdifferent amounts of path data according to the moving speed of theelectronic device 101 (or a moving speed or a moving stride of a userwho has possessed the electronic device 101).

According to various embodiments, the processor 120 may be configured todetermine the entry (or existence) of the electronic device 101, as anoperation before the collecting of multiple pieces of path data for eachof the multiple paths 310, 320, and 330 of the electronic device 101.For example, the processor 120 may be configured to store, in a memory(e.g., the memory 130 of FIG. 1 ), information (e.g., service setidentifier (SSID) or basic SSID (BSSID)) relating to at least one accesspoint disposed in the indoor space 300, and when a wireless LAN signal(e.g., a beacon signal) received later through a wireless communicationmodule (e.g., the wireless communication module 192 of FIG. 1 ) includesat least part of the information (e.g., SSID or BSSID) having beenstored in the memory 130, the processor 120 may be configured todetermine that the electronic device 101 has entered (or exists in) theindoor space 300.

For another example, the processor 120 may be configured to store, inthe memory 130, information relating to at least one cellular basestation (e.g., physical-layer cell ID (PCI), cell global identity (CGI),or absolute radio frequency channel number (ARFCN)) and locationinformation of each cellular base station (e.g., longitude andlatitude). When information (e.g., international mobile subscriberidentity (IMSI), physical-layer cell ID (PCI), cell global identity(CGI), or absolute radio frequency channel number (ARFCN)), receivedlater from at least one of a cellular base station of a serving cell anda cellular base station of a neighbor cell through the wirelesscommunication module 192, includes at least part of information (e.g.,SSID or BSSID) stored in the memory 130, the processor 120 may beconfigured to determine longitude and latitude information about theelectronic device 101 by using the received information. The processor120 may be configured to determine whether the electronic device 101enters the indoor space 300 based on the determined longitude andlatitude information of the electronic device 101. According to variousembodiments, the information (e.g., PCI, CGI, or ARFCN) relating to theat least one cellular base station and the location information (e.g.,longitude and latitude) of each cellular base station may be stored inan external server (e.g., the server 108 of FIG. 1 ). In this case, theprocessor 120 may be configured to transmit the cellular base stationinformation received by the electronic device 101 to the external server108, and receive, from the external server 108, the longitude andlatitude information of the electronic device 101 determined based onthe cellular base station information in the external server 108. Theprocessor 120 may be configured to determine whether the electronicdevice 101 enters the indoor space 300 based on at least the longitudeand latitude information of the electronic device 101 received from theexternal server 108.

According to various embodiments, as an operation before the collectingpath data for each of the multiple paths 310, 320, and 330 of theelectronic device 101, the processor 120 may be configured to receive auser input for specifying a zone (e.g., a first zone and a second zone)in which the path data is to be collected within the indoor space 300.In this regard, an application for supporting a location-based servicemay be stored in the memory 130 of the electronic device 101, and theprocessor 120 may be configured to provide a graphic user interface ofan application by using a display device (e.g., the display device 160of FIG. 1 ) during an initial configuration operation of thelocation-based service. According to an embodiment, the graphic userinterface may include a geographic layout with regard to the indoorspace 300 configured in the electronic device 101, and the processor 120may be configured to receive a user input for specifying a zone forcollection of path data based on the geographic layout with regard tothe indoor space 300. According to various embodiments, the geographiclayout may include at least one of a measurement-based geographic map ofthe indoor space 300, an abstracted geographic map, and a listindicating zone information (e.g., a room, a living room, or a bathroom)of the indoor space 300. Each processor herein includes processingcircuitry.

According to an embodiment, in response to receiving a user inputthrough the graphic user interface, the processor 120 may be configuredto request movement of the electronic device 101 (e.g., outputs a textor voice-based message) to a zone designated by a user. The processor120 may be configured to map information relating to a cellular signalor a wireless LAN signal (e.g., a received signal strength indicator(RSSI), SSID, or BSSID), which is received in a zone to which theelectronic device 101 moves in response to the request, to thecorresponding zone, and store the same in a memory (e.g., the memory 130of FIG. 1 ). The processor 120 may be configured to compare informationof a cellular signal or a wireless LAN signal (e.g., RSSI), which isreceived in a predetermined zone within the indoor space, withinformation mapped to a zone specified by the user, and recognize a zonein which path data relating to movement of the electronic device 101 isto be collected, based on at least the comparison.

Based on the above description, when it is determined that the entry (orexistence) of the electronic device 101 into the indoor space 300configured in the electronic device 101, the entry (or existence) of theelectronic device 101 into a specified zone within the correspondingindoor space 300, and the movement of the electronic device 101 in thecorresponding zone occur sequentially or simultaneously during apredetermined period related to the collection of multiple pieces ofdata, the processor 120 may be configured to collect multiple pieces ofpath data relating to the movement of the electronic device 101. Invarious embodiments, the processor 120 may be configured to not receivea user input specifying a zone, in which multiple pieces of path dataare to be collected, within the indoor space 300. In this case, when itis determined that the entry of the electronic device 101 into theindoor space 300 configured in the electronic device 101 and themovement of the electronic device 101 in the indoor space 300 occursequentially or simultaneously, the processor 120 may be configured tocollect multiple pieces of path data relating to the movement of theelectronic device 101.

According to various embodiments, the processor 120 may be configured tofurther receive, through an application for supporting thelocation-based service, a user input for specifying at least one ofinformation on a period during which multiple pieces of path data are tobe collected, and information on a time interval at which data withregard to the traveling path of the electronic device 101 is to becollected. Alternatively, at least one of the period information and thetime interval information may be determined based on at least scheduledinformation or an own algorithm of the electronic device 101irrespective of the user input. For example, the period information maybe dynamically determined according to a collection amount of multiplepieces of path data required for determining an intersection arearelating to the movement of the electronic device 101, and the timeinterval information may be determined based on at least a sampling rateconfigured differently according to the type of path data, which will bedescribed later with reference to FIG. 5B.

FIG. 5A illustrates an example of a coordinate direction with referenceto an electronic device according to an embodiment, and FIG. 5Billustrates an example of a virtual marker according to an embodiment.

Referring to FIG. 5A, the processor (e.g., the processor 120 of FIG. 1 ,including processing circuitry) of the electronic device 101 (e.g., theelectronic device 101 of FIG. 1 ) may be configured to process data,which is acquired through a sensor module (e.g., the sensor module 176of FIG. 1 , including a sensor) with respect to a traveling path of theelectronic device 101, to correspond to a coordinate direction definedbased on the electronic device 101. As an example of acquiring magneticdata through a magnetic sensor, the processor 120 may be configured toprocess the acquired magnetic data into an X-axis direction magneticfield component of the electronic device 101, a Y-axis directionmagnetic field component of the electronic device 101, and a Z-axisdirection magnetic field component of the electronic device 101.According to an embodiment, the coordinate direction with reference tothe electronic device 101 may be expressed differently from the globalcoordinate system depending on a state of possessing the electronicdevice 101 by a user, a state of holding the electronic device 101 bythe user, or a state in which the electronic device 101 is mounted on apredetermined substrate.

Hereinafter, a virtual marker 510 described with reference to FIG. 5Bmay refer to a set of pieces of data (e.g., Nth path data) acquired at adesignated time interval (e.g., one second interval) with respect to theNth path of the electronic device 101, and may be used as reference datafor determining the location of the electronic device 101 (or a space inwhich the electronic device 101 is located).

Referring to FIG. 5B, the virtual marker 510 may include sensing valuesindicating information on the Nth path of the electronic device 101, andthe virtual marker 510 may be stored in a memory (e.g., the memory 130of FIG. 1 ). In an embodiment, the virtual marker 510 may include atleast one of a magnetic sensing value 520, an acceleration sensing value530, a gyro sensing value 540, a first wireless communication signal550, and a second wireless communication signal 560.

In an embodiment, the magnetic sensing value 520 may include a magnitudevalue for each direction of the magnetic field, which is measured at aspecific speed according to a sampling rate designated in the Nth path.The processor 120 of the electronic device 101 may be configured tomeasure the magnitude value for each direction of the magnetic fieldduring a designated measurement duration in order to measure themagnetic sensing value 520. The measurement duration may be configuredas a time for measuring the magnitude value for each direction of themagnetic field during one-time measurement for example. For example,when the sampling rate is 1 Hz and the measurement duration is 0.1seconds, the processor 120 may be configured to measure the magnitudevalue for each direction of the magnetic field for 0.1 second at adesignated time interval (e.g., a periodicity of 1 second). Accordingly,the measurement of the magnetic field may be performed for 0 second to0.1 second, 1.0 second to 1.1 seconds, . . . , or N.0 seconds to N.1seconds (N is a natural number).

In an embodiment, the processor 120 may be configured to measure amagnetic field in the Nth path of the electronic device 101, by using amagnetic field sensor (or a magnetic sensor) included in a sensor module(e.g., the sensor module 176 of FIG. 1 ). For example, the processor 120may be configured to measure the magnetic field in the Nth path from afirst time (Timestamp 1) to a Nth time (Timestamp N), by using themagnetic field sensor. In this case, the magnetic sensing value 520 mayinclude the strength (MagX1) in the X-axis direction of the magneticfield measured at a first time (Timestamp 1), the strength (MagY1) inthe Y-axis direction of the magnetic field measured at a first time(Timestamp 1), and the strength (MagZ1) in the Z-axis direction of themagnetic field measured at a first time (Timestamp 1). Correspondingly,the magnetic sensing value 520 may include the strength (MagXN) in theX-axis direction of the magnetic field measured at a Nth time (TimestampN), the strength (MagYN) in the Y-axis direction of the magnetic fieldmeasured at a Nth time (Timestamp N), and the strength (MagZN) in theZ-axis direction of the magnetic field measured at a Nth time (TimestampN).

In an embodiment, the acceleration sensing value 530 may include amagnitude value for each direction of the acceleration of the electronicdevice 101 measured at a specific rate according to a sampling ratedesignated in the Nth path. The processor 120 of the electronic device101 may be configured to measure a magnitude value for each direction ofacceleration during a designated measurement duration in order tomeasure the acceleration sensing value 530. The measurement duration maybe configured, for example, as a time (e.g., 0.1 second) for measuringthe magnitude value for each direction of acceleration during one-timemeasurement.

In an embodiment, the processor 120 may be configured to measureacceleration in the Nth path of the electronic device 101, by using anacceleration sensor included in the sensor module 176 (including asensor). For example, the processor 120 may be configured to measure theacceleration on the Nth path from a first time (Timestamp 1) to a Nthtime (Timestamp N) by using the acceleration sensor. In this case, theacceleration sensing value 530 may include the acceleration (AccX1) inthe X-axis direction of the electronic device 101 measured at a firsttime (Timestamp 1), the acceleration (AccY1) in the Y-axis direction ofthe electronic device 101 measured at a first time (Timestamp 1), andthe acceleration (AccZ1) in the Z-axis direction of the electronicdevice 101 measured at a first time (Timestamp 1). Correspondingly, theacceleration sensing value 530 may include the acceleration (AccXN) inthe X-axis direction of the electronic device 101 measured at a Nth time(Timestamp N), the acceleration (AccYN) in the Y-axis direction of theelectronic device 101 measured at a Nth time (Timestamp N), and theacceleration (AccZN) in the Z-axis direction of the electronic device101 measured at a Nth time (Timestamp N).

In an embodiment, the gyro sensing value 540 may include the value ofangular orientation formed by the electronic device 101 with the ground,measured at a specific rate according to a sampling rate designated inthe Nth path. The processor 120 of the electronic device 101 may beconfigured to measure an angular direction value for a designatedmeasurement duration in order to measure the gyro sensing value 540. Themeasurement duration may be configured, for example, to a time (e.g.,0.1 second) for measuring a magnitude value for each direction of anangle during one-time measurement.

In an embodiment, the processor 120 may be configured to measure thevalue of angular direction formed by the electronic device 101 with theground in the Nth path of the electronic device 101, by using a gyrosensor included in the sensor module 176. For example, the processor 120may be configured to measure the value of angular direction, formed bythe electronic device 101 with the ground in the Nth path from a firsttime (Timestamp 1) to a Nth time (Timestamp N), by using the gyrosensor. In this case, the gyro sensing value 540 may include a rollvalue (Roll1) of the electronic device 101 measured at a first time(Timestamp 1), a pitch value of (Pitch1) of the electronic device 101measured at a first time (Timestamp 1), and a yaw value (Yaw1) of theelectronic device 101 measured at a first time (Timestamp 1).Correspondingly, the gyro sensing value 540 may include the roll value(RollN) of the electronic device 101 measured at a Nth time (TimestampN), the pitch value (PitchN) of the electronic device 101 measured at aNth time (Timestamp N), and the yaw value (YawN) of the electronicdevice 101 measured at a Nth time (Timestamp N).

In an embodiment, the gyro sensing value 540 may include a magnitudevalue for each direction of the angular acceleration of the electronicdevice 101, which is measured at a specific speed according to adesignated sampling rate in the Nth path. The processor 120 of theelectronic device 101 may measure a magnitude value for each directionof angular acceleration for a designated measurement duration in orderto measure the gyro sensing value 540.

In an embodiment, the processor 120 may be configured to measure theangular acceleration of the electronic device 101 on the Nth path from afirst time (Timestamp 1) to a Nth time (Timestamp N), by using the gyrosensor included in the sensor module 176. In this case, the gyro sensingvalue 540 may include an angular acceleration (AnvX1) in the X-axisdirection of the electronic device 101 measured at a first time(Timestamp 1), an angular acceleration (AnvY1) in the Y-axis directionof the electronic device 101 measured at a first time (Timestamp 1), andan angular acceleration (AnvZ1) in the Z-axis direction of theelectronic device 101 measured at a first time (Timestamp 1).Correspondingly, the gyro sensing value 540 may include an angularacceleration (AnvXN) in the X-axis direction of the electronic device101 measured at a Nth time (Timestamp N), an angular acceleration(AnvYN) in the Y-axis direction of the electronic device 101 measured ata Nth time (Timestamp N), and an angular acceleration (AnvZn) in theZ-axis direction of the electronic device 101 measured at a Nth time(Timestamp N).

In an embodiment, the first wireless communication signal 550 mayinclude a strength value of an access point (AP) signal measured using awireless communication module (e.g., the wireless communication module192 of FIG. 1 ). The first wireless communication signal 550 may includeinformation relating to the number of AP signals of a broadband LAN(WLAN). The first wireless communication signal 550 may includeinformation relating to the strength of the AP signal measured on theNth path. For example, the first wireless communication signal 550 mayinclude values from the strength of the first AP signal (AP1 signalstrength) to the strength of the Nth AP signal (APN signal strength).

In an embodiment, the second wireless communication signal 560 mayinclude a strength value of a cell signal of cellular communication,measured using the wireless communication module 192. The secondwireless communication signal 560 may include information relating tothe number of cells. The second wireless communication signal 560 mayinclude information relating to the strengths of the first to Nth cellsignals measured on the Nth path. For example, the second wirelesscommunication signal 560 may include values from the strength of thefirst cell signal (Cell1 signal strength) to the strength of the Nthcell signal (cellN signal strength).

In an embodiment, the processor 120 may use a camera (e.g., the camera180 of FIG. 1 ) supporting the augmented reality (AR) technology inorder to spatially match the sensing values (or signal values) measuredon the Nth path to the Nth path, and may be configured to estimate therelative location of the electronic device 101 by processing an imageacquired based on the camera 180.

In an embodiment, the processor 120 may be configured to generate avirtual marker including information of a one-dimensional line shape, avirtual marker including information of a two-dimensional planar shape,or a virtual marker including information of a three-dimensional spaceshape, by using at least one of the sensing values 520, 530, and/or 540and the signal values 550 and/or 560.

In an embodiment, the virtual marker 510 may include movementinformation of the electronic device 101 including at least one ofsensing values changed while the electronic device 101 is moving, aspeed of the electronic device 101, and a direction of the electronicdevice 101. In an embodiment, the virtual marker 510 may includefeatures of a designated space. When the electronic device 101 generatesthe virtual marker 510 in an indoor space, the virtual marker 510 mayinclude at least one of a feature relating to a structural shape of theindoor space and a physical characteristic of an object disposed in theindoor space. For example, the shape of a structure including at leastone of a steel frame, a staircase, and a wall relating to the indoorspace may be reflected in the virtual marker 510. As another example,material characteristics of an object such as furniture arranged in anindoor space may be reflected in the virtual marker 510.

In an embodiment, the virtual marker 510 may include magnetic fieldinformation reflecting the structural information of the indoor space.The virtual marker 510 may include at least one of an acceleration valueand rotational movement information of the electronic device 101. Thevirtual marker 510 may include information on surrounding wirelesssignals in relation to optimization of power consumption of theelectronic device 101. For example, the virtual marker 510 may includeat least one of Wi-Fi signal information and cellular signalinformation. In the virtual marker 510, a first time (Timestamp 1) to aNth time (Timestamp N) may be stored as values corresponding to timeintervals configured to measure a sensing value (at least one of thesensing values 520, 530, and 540).

Although not shown, according to various embodiments, the virtual marker510 may include a latitude value and a longitude value of the electronicdevice 101. The latitude value and longitude value of the electronicdevice 101 with regard to the Nth path may be measured from a first time(Timestamp 1) to a Nth time (Timestamp N), by using at least one of aglobal positioning system (GPS) and a wireless communication module 192included in the sensor module 176. For example, the latitude valuemeasured on the Nth path may include the first latitude value (Lat1)measured at a first time (Timestamp 1) to the Nth latitude value (LatN)measured at a Nth time (Timestamp N). The longitude value measured onthe Nth path may include the first longitude value (Lon1) measured at afirst time (Timestamp 1) to the Nth longitude value (LonN) measured at aNth time (Timestamp N).

FIG. 6 illustrates the distribution form of pieces of data collected ina first zone and a second zone in an indoor space according to anembodiment, and FIG. 7 illustrates the distribution form of pieces ofdata collected from each of various traveling paths of the electronicdevice according to an embodiment. Each of VX, VY, and VZ shown in FIGS.6 and 7 may indicate a data value for a coordinate direction (e.g., thecoordinate direction of FIG. 5A) with reference to the electronic device(e.g., the electronic device 101 of FIG. 1 ). For example, when magneticdata is collected as collection data, each of Mag X, Mag Y, and Mag Zmay correspond to VX, VY, and VZ.

FIG. 6 is a 3D graph showing pieces of magnetic data collected in eachof a first zone and a second zone within an indoor space (e.g., theindoor space 200, 300 or 400 of FIG. 2 , FIG. 3 , or FIG. 4 ,respectively). Referring to FIG. 6 , it may be seen that magnetic data(e.g., X) collected in the first zone and magnetic data (e.g., O)collected in the second zone indicate mutually distinct distributioncharacteristics on the graph. For example, magnetic data collected in apredetermined zone within the indoor space 200 or 300 may have distorteddirection values (Mag X, Mag Y, and Mag Z) due to the magneticcharacteristics of a steel frame or a steel structure disposed in oradjacent to the corresponding zone. Based on this, pieces of magneticdata collected in each of the first zone and the second zone in theindoor space 200 or 300 may have mutually distinct direction valuesaccording to the degree of distortion by the steel frame or steelstructure relating to a zone in which the corresponding magnetic data iscollected.

FIG. 7 illustrates a 3D graph showing pieces of magnetic data collectedfrom each of multiple paths of an electronic device (e.g., theelectronic device 101 of FIG. 1 ) moving between a first zone and asecond zone. Referring to FIG. 7 , it may be seen that pieces ofmagnetic data collected from a first path, pieces of magnetic datacollected from a second path, pieces of magnetic data collected from athird path, and pieces of magnetic data collected on the Nth path mayindicate an abrupt change in distribution in a third area between afirst area on the graph corresponding to the first zone and a secondarea on the graph corresponding to the second zone. This may beunderstood as meaning that, according to the movement of the electronicdevice 101 from the first zone to the second zone or the movement of theelectronic device 101 from the second zone to the first zone, pieces ofmagnetic data collected from a path with regard to the movement undergoabrupt changes. Based on this, with respect to multiple pieces ofmagnetic data collected from a predetermined path of the electronicdevice 101, the pieces of magnetic data collected in the first zone andthe pieces of magnetic data collected in the second zone may indicatemutually distinct direction values.

In FIGS. 6 and 7 above, magnetic data is referred to in order to showdistinct characteristics between pieces of data collected in each of thefirst zone and the second zone. However, the aforementioned accelerationdata, gyro data, wireless LAN signal, or cellular signal may alsoindicate a value or strength distinguished for each zone by thestructure of a zone in which data collection is performed, an objectwithin a zone for data collection, or a wireless footprintcharacteristic in a zone for data collection.

FIG. 8 illustrates a similarity relation between pieces of datacollected from each of various traveling paths of an electronic deviceaccording to an embodiment, and FIG. 9 illustrates a spatial divisionform of various traveling paths of an electronic device according to anembodiment.

Referring to FIGS. 8 and 9 , the processor (e.g., the processor 120 ofFIG. 1 ) of the electronic device (e.g., the electronic device 101 ofFIG. 1 ) according to an embodiment may be configured to determine anintersection area for multiple traveling paths of the electronic device101 moving between a first zone and a second zone. For example, theprocessor 120 may be configured to determine an intersection area in anindoor space where a first path, a second path, and a third path atleast partially overlap each other, based on the degree of similarityamong pieces of data configuring first path data 810 collected from thefirst path of the electronic device 101, pieces of data configuringsecond path data 820 collected from the second path thereof, and piecesof data configuring third path data 830 collected from the third paththereof (e.g., when comparing pieces of data corresponding to the firstpath, pieces of data corresponding to the second path, and pieces ofdata corresponding to the third path, the similarity therebetween has avalue similar to a designated threshold ratio or more). According tovarious embodiments, the multiple paths of the electronic device 101 arenot limited to the first path, the second path, and the third path, andmay be implemented with various number of paths in relation to thenumber of times of movement of the electronic device 101 or the amountof data collection required to determine the intersection area during adesignated period related to the collection of the multiple pieces ofpath data.

In an embodiment, when the designated period elapses (or when thecollection of a designated amount of path data for determining anintersection area is completed), the processor 120 may be configured todetermine the degree of similarity between the multiple pieces ofcollected path data. For example, the processor 120 may be configured tocompare direction values or strength values of multiple pieces of dataconfiguring each of the first path data 810, the second path data 820,and the third path data 830 (e.g., data a1 to data a10 collected fromthe first path, data b1 to b10 collected from the second path, and datac1 to c10 collected from the third path). The processor 120 may beconfigured to identify, based on at least the comparison, multiplepieces of first data 840 which are similar to each other at a designatedlevel or higher (e.g., a designated threshold ratio or more) (e.g., dataa5 and data a6 collected from the first path, data b3 and data b4collected from the second path, and data c5 and data c6 collected fromthe third path), and determine one area in an indoor space, in which themultiple pieces of first data 840 are collected, as an intersection area910 in which multiple paths (e.g., the first path, the second path, andthe third path) of the electronic device 101 at least partially overlapeach other.

According to an embodiment, the processor 120 may be configured tospatially partition at least part of the first path data 810, the secondpath data 820, and the third path data 830, based on the intersectionarea 910 determined with respect to the multiple paths of the electronicdevice 101. In this regard, the processor 120 may be configured tospatially arrange multiple pieces of data for each of the first pathdata 810, the second path data 820, and the third path data 830 on anindoor space. The processor 120 may be configured to group multiplepieces of second data having mutually identical or similar firstdistribution characteristics (e.g., directionality or adjacency ofspatially arranged pieces of data) (e.g., data a1 to data a4 collectedfrom the first path, data b1 and data b2 collected from the second path,and data c1 to data c4 collected from the third path) into a firstgroup, based on the determined intersection area 910. Similarly, theprocessor 120 may be configured to group multiple pieces of third datahaving mutually identical or similar second distribution characteristicsdifferent from the first distribution characteristics (e.g., data a7 todata a10 collected from the first path, data b5 to data b10 collectedfrom the second path, and data c7 to data c10 collected from the thirdpath) into a second group, based on the determined intersection area910.

In an embodiment, the processor 120 may be configured to determine anarea range in which multiple pieces of second data in the first groupare collected as a first space 920 in an indoor space, and determine anarea range in which multiple pieces of third data in the second groupare collected as a second space 930 in the indoor space. According tovarious embodiments, the size of each of the first space 920 and thesecond space 930 may be determined by a one-dimensional boundary capableof covering an area range in which multiple pieces of second data arecollected or an area range in which multiple pieces of third data arecollected. According to various embodiments, in response to thedetermination of the first space 920 and the second space 930, theprocessor 120 may be configured to visually display the first space 920and the second space 930 on a graphic user interface of an applicationincluding a geographic layout for the indoor space. When the processor120 may be configured to output a graphic user interface to which thefirst space 920 and the second space 930 are reflected, and when a userinput relating to user confirmation is received through the graphic userinterface, the processor 120 may be configured to confirm thedetermination of the first space 920 and the second space 930.

In an embodiment, the processor 120 may be configured to define an indexfor each of the determined first space 920 and the second space 930. Forexample, with regard to each of points on the first path, points on thesecond path, and points on the third path, from which the multiplepieces of second data are collected, the processor 120 may be configuredto generate a virtual marker based on at least part of the multiplepieces of second data (e.g., a virtual marker corresponding to points onthe first path, a virtual marker corresponding to points on the secondpath, and a virtual marker corresponding to points on the third path),and generate a first index for the first space 920 including thegenerated multiple virtual markers. For another example, the processor120 may be configured to generate an integrated virtual marker (e.g., anintegrated virtual marker including a representative value (averagevalue) of multiple pieces of second data collected from points on thefirst path, points on the second path, and points on the third path),and generate a first index for the first space 920 by using theintegrated virtual marker. Similarly, with regard to each of points onthe first path, points on the second path, and points on the third path,from which the multiple pieces of third data are collected, processor120 may be configured to generate a virtual marker based on the multiplepieces of third data (e.g., a virtual marker corresponding to points onthe first path, a virtual marker corresponding to points on the secondpath, and a virtual marker corresponding to points on the third path),and generate the second index for the second space 930 including thegenerated multiple virtual markers. Alternatively, the processor 120 maybe configured to generate the second index for the second space 930 byusing an integrated virtual marker including a representative value(e.g., average value) of the multiple pieces of third data.

In various embodiments, after determining the first space 920 and thesecond space 930 (or after index generation), the processor 120 may beconfigured to request configuration of an event to be provided when theelectronic device 101 enters the first space 920 or the second space 930(or stays for more than a designated period of time therein) through anapplication for providing a location-based service. For example, theprocessor 120 may be configured to display a list of at least one eventthat may be provided to the first space 920 or the second space 930,through the execution screen of the application, and receive a userinput to select a specific event. The processor 120 may be configured todetermine an event corresponding to the user input as a location-basedservice for the first space 920 or the second space 930, and includeinformation related to the event in the index of the first space 920 orthe second space 930. Alternatively, the processor 120 may be configuredto receive a user input for designating, as the event, output of voicedata according to a user's utterance, output of image data or recordeddata according to a user's image capturing, or output of text dataaccording to a user's handwriting, and include information regarding thecorresponding event in the index of the first space 920 or the secondspace 930. In various embodiments, the event may be provided based onthe execution of at least one application preloaded or installed in theelectronic device 101 or may be provided based on the output of datagenerated by the user.

In an embodiment, the processor 120 may be configured to store indexesfor each of the first space 920 and the second space 930 in a memory(e.g., the memory 130 of FIG. 1 ), and determine the location of theelectronic device 101 (or a space in which the electronic device 101 islocated) by making reference to the indexes. In this regard, after thedetermination of the first space 920 and the second space 930 (or afterindex generation), the processor 120 may be configured to compare dataor signal, which is acquired using at least one of the sensor module(e.g., the sensor module 176 of FIG. 1 ) and the wireless communicationmodule (e.g., the wireless communication module 192 of FIG. 1 ), withthe virtual marker or the integrated virtual marker included in theindex. When the acquired data or signal is similar to at least one ofmultiple virtual markers in the index corresponding to the first space920 or to the integrated virtual marker at a predetermined level orhigher, the processor 120 may be configured to determine that theelectronic device 101 is located within the first space 920.Alternatively, when the acquired data or signal is similar to at leastone of multiple virtual markers in the index corresponding to the secondspace 930 or to the integrated virtual marker at a predetermined levelor higher, the processor 120 may be configured to determine that theelectronic device 101 is located within the second space 930. In anembodiment, when it is determined that the electronic device 101 islocated (or entered, or stayed for a designated period of time orlonger) in the first space 920 or the second space 930, the processor120 may be configured to identify event information included in theindex corresponding to the first space 920 or the second space 930, andprovide a location-based service based on the execution of anapplication or data output related to the corresponding eventinformation.

FIG. 10 illustrates the form of filtering pieces of data collected fromeach of various traveling paths of an electronic device according to anembodiment, and FIG. 11 illustrates the form of filtering pieces of datacollected from each of various traveling paths of an electronic deviceaccording to another embodiment, and FIG. 12 illustrates thedistribution form of filtered pieces of data according to an embodiment.

According to an embodiment, the processor (e.g., the processor 120 ofFIG. 1 ) of the electronic device (e.g., the electronic device 101 ofFIG. 1 ) may be configured to filter at least part of multiple pieces ofpath data collected with regard to each of the multiple paths of theelectronic device 101. For example, in an operation of determining anintersection area for the multiple paths by using the collected multiplepieces of path data, the processor 120 may be configured to filter atleast part of the multiple pieces of path data in order to reduce anoperation quantity or complexity of the multiple pieces of path data. Inthis regard, the processor 120 may be configured to interpret the pathdata collected from each of the multiple paths as one vector accordingto the N dimension, and derive path data that may be interpreted as arelatively low M-dimensional vector than the N dimension by applying adimensionality reduction technique to the N-dimensional vector-basedpath data.

For example, with reference to FIG. 10 , the processor 120 may beconfigured to interpret magnetic data-based first path data 1010 (e.g.,data a1 to data a10) collected from a first path as a 10-dimensionalvector (e.g., may be configured to apply data a1 to data a10 to the 1staxis to the 10th axis, respectively), and apply X-axis direction values(e.g., Mag X1 to Mag X10) of the multiple pieces of magnetic dataconfiguring the first path data 1010 to the 10-dimensional vector. Theprocessor 120 may be configured to perform, with regard to the10-dimensional vector-based first path data to which the X-axisdirection value is applied, a dimensional reduction based on a principalcomponent analysis technique or a t-distributed stochastic neighborembedding technique, so as to acquire 3D vector-based path data 1015(e.g., data a1′, data a2′, and data a3′) maintaining the X-axisdirection characteristic of the magnetic data. According to anembodiment, the processor 120 may be configured to interpret second pathdata 1020 (e.g., data b1 to data b10) collected from a second path as a10-dimensional vector and then perform a dimensional reduction thereof,so as to acquire three-dimensional vector-based path data 1025 (e.g.,data b1′, data b2′, and data b3′) maintaining the Y-axis directioncharacteristic of magnetic data collected from the second path. Inaddition, the processor 120 may be configured to interpret third pathdata 1030 (e.g., data c1 to data c10) collected from a third path as a10-dimensional vector and then perform a dimensional reduction thereof,so as to acquire three-dimensional vector-based path data 1035 (e.g.,data c1′, data c2′, and data c3′) maintaining the Z-axis directioncharacteristic of magnetic data collected from the third path. Theprocessor 120 may be configured to determine an intersection area formultiple paths of the electronic device 101 based on the filtered (e.g.,dimensional reduced) multiple pieces of path data (e.g., data a1′ todata a3′ 1015 collected from the first path, data b1′ to data b3′ 1025collected from the second path, and data c1′ to data c3′ 1035 collectedfrom the third path), and spatially partition the filtered multiplepieces of path data based on the intersection area.

Referring to FIG. 11 , the processor 120 may be configured to apply,with regard to magnetic data-based first path data (e.g., data a1 todata a9) collected from a first path, X-axis direction values (e.g., MagX1 to Mag X9) of multiple pieces of magnetic data configuring the firstpath data. In addition, the processor 120 may be configured to apply,with regard to second path data (e.g., data b1 to data b9) collectedfrom a second path, Y-axis direction values (e.g., Mag Y1 to Mag Y9) ofmultiple pieces of magnetic data configuring the second path data; andapply, with regard to third path data (e.g., data c1 to data c9)collected from a third path, Z-axis direction values (e.g., Mag Z1 toMag Z9) of multiple pieces of magnetic data configuring the third pathdata. The processor 120 may be configured to interpret, as onethree-dimensional data, a combination of data a1 of first path data 1110to which the X-axis direction value is applied, data b1 of second pathdata 1120 to which the Y-axis direction value is applied, and data c1 ofthird path data 1130 to which the Z-axis direction value is applied, andin this case, it may be interpreted that a total of nine 3-dimensionaldata has been collected. The processor 120 may be configured tointerpret, as one 9-dimensional data (e.g., a combination of data a1,data b1, data c1, data a2, data b2, data c2, data a3, data b3, and datac3) by merging three pieces of 3-dimensional data (e.g., a combinationof data a1, data b1, and data c1, a combination of data a2, data b2, anddata c2, and a combination of data a3, data b3, and data c3), and inthis case, it may be interpreted that a total of three 9-dimensionaldata 1140 has been collected. The processor 120 may be configured toperform, with regard to the one 9-dimensional data, a dimensionalreduction based on a principal component analysis technique or at-distributed stochastic neighbor embedding technique, so as to acquire3D vector-based path data maintaining the X-axis directioncharacteristic, Y-axis direction characteristic, and Z-axis directioncharacteristic of magnetic data (e.g., data a1″, data b1″, and data c1″)and based on this, the processor may acquire a total of three3-dimensional data 1150 as path data.

FIG. 12 may show a distribution pattern of a small amount of filteredpath data obtained by filtering the collected multiple pieces of pathdata, having been described above with reference to FIG. 7 , based onthe dimension reduction technique. Referring to FIG. 12 , when thefiltered path data is analyzed by the processor 120, an intersectionzone of the filtered path data and an intersection area for multiplepaths of the electronic device 101 corresponding to the intersectionzone may be clearly determined compared to that shown in FIG. 7 .

FIG. 13 illustrates a positioning method by an electronic deviceaccording to an embodiment.

Referring to FIG. 13 , in operation 1301, a processor (e.g., theprocessor 120 of FIG. 1 ) of an electronic device (e.g., the electronicdevice 101 of FIG. 1 ) according to an embodiment may be configured tocollect multiple pieces of path data related to movement of theelectronic device 101. For example, the processor 120 may be configuredto collect pieces of data for each of multiple paths of the electronicdevice 101 moving between a first zone and a second zone within adesignated indoor space. According to an embodiment, pieces of magneticdata, which are acquired at a designated time interval on the first pathaccording to the movement of the electronic device 101, may be collectedas first path data, and pieces of magnetic data, which are acquired atthe designated time interval on the second path, may be collected assecond path data.

According to an embodiment, in operation 1303, the processor 120 may beconfigured to compare the first path data and the second path datacollected for each of multiple paths (e.g., the first path and thesecond path) of the electronic device 101, so as to identify multiplepieces of first magnetic data having a similarity therebetween. Forexample, the processor 120 may be configured to identify multiple piecesof first magnetic data having a similarity greater than or equal to adesignated level (e.g., similar to each other by a designated thresholdratio or more) between pieces of magnetic data configuring the firstpath data and pieces of magnetic data configuring the second path data.Each embodiment herein may be used in combination with any otherembodiment(s).

According to an embodiment, in operation 1305, the processor 120 may beconfigured to determine an intersection area of multiple paths (e.g., afirst path and a second path) according to multiple movements of theelectronic device 101. For example, the processor 120 may be configuredto determine an area in an indoor space, in which the multiple pieces offirst magnetic data are collected, as an intersection area where thefirst path and the second path of the electronic device 101 intersect.

According to an embodiment, in operation 1307, the processor 120 may beconfigured to determine (or define) spaces in the indoor space based onthe determined intersection area. In this regard, the processor 120 maybe configured to spatially arrange collected multiple pieces of data(e.g., pieces of magnetic data configuring the first path data andpieces of magnetic data configuring the second path data) on the indoorspace. The processor 120 may be configured to group multiple pieces ofsecond magnetic data having mutually identical or similar firstdistribution characteristics (e.g., directionality or adjacency ofspatially arranged pieces of data) into a first group based on thedetermined intersection area, and group multiple pieces of thirdmagnetic data having a second distribution characteristic different fromthe first characteristic into a second group. The processor 120 may beconfigured to determine an area range, in which multiple pieces ofsecond magnetic data included in the first group are collected, as afirst space in an indoor space, and determine an area range, in whichmultiple pieces of third magnetic data included in the second group arecollected, as a second space in an indoor space. In an embodiment, theprocessor 120 may be configured to, with regard to each of points on thefirst path and points on the second path from which the multiple piecesof second data are collected, generate a virtual marker based on atleast part of the multiple pieces of second data (e.g., a virtual markercorresponding to points on the first path and a virtual markercorresponding to points on the second path), and generate a first indexfor the first space including the generated multiple virtual markers. Inan embodiment, the processor 120 may be configured to, with regard toeach of points on the first path and points on the second path fromwhich the multiple pieces of third data are collected, generate avirtual marker based on at least part of the multiple pieces of thirddata (e.g., a virtual marker corresponding to points on the first pathand a virtual marker corresponding to points on the second path), andgenerate a second index for a second space including the generatedmultiple virtual markers.

According to an embodiment, in operation 1309, the processor 120 may beconfigured to determine a space in which the electronic device 101 islocated, based on the determined first space and the second space. Forexample, after determining the first space and the second space (or,after generation of the first index and second index), the processor 120may be configured to compare magnetic data acquired using a sensormodule (e.g., the sensor module 176 of FIG. 1 ) with multiple virtualmarkers included in the first index and multiple virtual markersincluded in the second index. The processor 120 may be configured todetermine that the electronic device 101 is located in the first spacewhen the magnetic data acquired using the sensor module 176 is similarto at least one of the multiple virtual markers in the first index at adesignated level or higher and, when the acquired data is similar to atleast one of the multiple virtual markers in the second index at adesignated level or higher, the processor 120 may be configured todetermine that the electronic device 101 is located in the second space.In response to the determining the location of the electronic device101, the processor 120 may be configured to provide an event defined ina space (e.g., the first space or the second space) in which theelectronic device 101 is located.

An electronic device according to various embodiments described abovemay include a magnetic sensor and a processor operatively connected tothe magnetic sensor.

According to various embodiments, the processor may be configured tocollect multiple pieces of path data based on first magnetic datarelated to multiple movements of the electronic device, by using themagnetic sensor; identify multiple pieces of second magnetic data, whichare similar to each other at a predetermined level or higher, from amongthe multiple pieces of path data; determine an area range, in which themultiple pieces of second magnetic data are collected, to be anintersection area related to the multiple movements of the electronicdevice; determine a first space and a second space related to themultiple movements of the electronic device based on the intersectionarea; and determine a space, in which the electronic device is located,among the first space and the second space based on third magnetic dataacquired using the magnetic sensor.

According to various embodiments, the processor may be configured togroup multiple pieces of fourth magnetic data having mutually identicalor similar first distribution characteristics with reference to themultiple pieces of second magnetic data among the multiple pieces ofpath data, and group multiple pieces of fifth magnetic data havingmutually identical or similar second distribution characteristics,different from the first distribution characteristics, with reference tothe multiple pieces of second magnetic data among the multiple pieces ofpath data.

According to various embodiments, the processor may be configured todetermine an area range, in which the multiple pieces of fourth magneticdata are collected, to be the first space in a designated indoor spacerelated to the collection of the multiple pieces of path data, anddetermine an area range, in which the multiple pieces of fifth magneticdata are collected, to be the second space within the designated indoorspace.

According to various embodiments, the processor may be configured tocollect the first magnetic data at each of multiple points on a pathcorresponding to a designated time interval, with regard to each ofmultiple paths regarding multiple movements of the electronic device,and generate a virtual marker for a point on the path, on which thefirst magnetic data has been collected, by using the first magneticdata.

According to various embodiments, the processor may be configured togenerate the virtual marker by using a direction value of a magneticfield included in the first magnetic data.

According to various embodiments, the processor may be configured togenerate a first index for the first space including multiple firstvirtual markers generated using the multiple pieces of fourth magneticdata, and generate a second index for the second space includingmultiple second virtual markers generated using the multiple pieces offifth magnetic data.

According to various embodiments, the processor may be configured tocompare the third magnetic data with at least one of the multiple firstvirtual markers and the multiple second virtual markers.

According to various embodiments, the processor may be configured todetermine a space, in which the electronic device is located, to be thefirst space when the third magnetic data is similar to at least one ofthe multiple first virtual markers at a designated level or higher, anddetermine a space, in which the electronic device is located, to be thesecond space when the third magnetic data is similar to at least one ofthe multiple second virtual markers at a predetermined level or higher.

According to various embodiments, the electronic device may furtherinclude a display device, and a memory in which an application forsupporting a location-based service is stored.

According to various embodiments, the processor may be configured tooutput a graphic user interface of the application including ageographic layout for a designated indoor space, by using a displaydevice, and receive, through the graphic user interface, a first userinput for designating multiple zones for collection of the multiplepieces of path data within the designated indoor space.

According to various embodiments, the processor may be configured todisplay the first space and the second space on the graphic userinterface, by using the display device, receive a second user inputrelated to user confirmation of the first space and the second spacethrough the graphic user interface, and determine the first space andthe second space in response to receiving the second user input.

According to various embodiments, the processor may be configured todisplay a list of at least one event to be provided when the electronicdevice is determined as being located in the first space or the secondspace, by using the display device, and in response to a third userinput to the list, determine an event corresponding to the first spaceor the second space.

According to various embodiments, the electronic device may furtherinclude at least one of an acceleration sensor and a gyro sensor.

According to various embodiments, the processor may be configured to,when the movement of the electronic device is detected in at least oneof the multiple zones by using at least one of the acceleration sensorand the gyro sensor, collect path data regarding a path on which theelectronic device moves from a first time point at which the movement isdetected to a second time point at which the detection of movementterminates.

A positioning method by an electronic device according to variousembodiments may include: collecting multiple pieces of path data basedon first magnetic data related to multiple movements of the electronicdevice by using a magnetic sensor; identifying multiple pieces of secondmagnetic data, which are similar to each other at a predetermined levelor higher, from among the multiple pieces of path data; determining anarea range, in which the multiple second magnetic data are collected, tobe an intersection area related to the multiple movements of theelectronic device; determining a first space and a second space relatedto the multiple movements of the electronic device based on theintersection area; and determining a space, in which the electronicdevice is located, among the first space and the second space based onthird magnetic data acquired using the magnetic sensor.

According to various embodiments, the determining of the first space andthe second space may include: grouping multiple pieces of fourthmagnetic data having mutually identical or similar first distributioncharacteristics with reference to the multiple pieces of second magneticdata among the multiple pieces of path data; and grouping multiplepieces of fifth magnetic data having mutually identical or similarsecond distribution characteristics, different from the firstdistribution characteristics, with reference to the multiple pieces ofsecond magnetic data among the multiple pieces of path data.

According to various embodiments, the determining of the first space andthe second space may further include: determining an area range, inwhich the multiple pieces of fourth magnetic data are collected, to bethe first space in a designated indoor space related to the collectionof the multiple pieces of path data; and determining an area range, inwhich the multiple pieces of fifth magnetic data are collected, to bethe second space within the designated indoor space.

According to various embodiments, the collecting of multiple pieces ofpath data based on the first magnetic data may include: collecting thefirst magnetic data at each of multiple points on a path correspondingto a designated time interval, with regard to each of multiple pathsregarding the multiple movements of the electronic device; andgenerating a virtual marker for a point on the path, on which the firstmagnetic data has been collected, by using the first magnetic data.

According to various embodiments, the generating of the virtual markermay include: generating a first index for the first space includingmultiple first virtual markers generated using the multiple pieces offourth magnetic data; and generating a second index for the second spaceincluding multiple second virtual markers generated using the multiplepieces of fifth magnetic data.

According to various embodiments, the determining of a space in whichthe electronic device is located may include comparing the thirdmagnetic data with at least one of the multiple first virtual markersand the multiple second virtual markers.

According to various embodiments, the determining of a space in whichthe electronic device is located may further include: determining aspace, in which the electronic device is located, to be the first spacewhen the third magnetic data is similar to at least one of the multiplefirst virtual markers at a designated level or higher; and determining aspace, in which the electronic device is located, to be the second spacewhen the third magnetic data is similar to at least one of the multiplesecond virtual markers at a predetermined level or higher.

According to various embodiments, the collecting of multiple pieces ofpath data based on the first magnetic data may further include:outputting a graphic user interface including a geographic layout for adesignated indoor space, by using a display device; and receiving,through the graphic user interface, a first user input for designatingmultiple zones for collection of the multiple pieces of path data withinthe designated indoor space.

According to various embodiments, the determining of the first space andthe second space may include: displaying the first space and the secondspace on the graphic user interface, by using the display device; andreceiving a second user input related to user confirmation of the firstspace and the second space through the graphic user interface.

The electronic device according to various embodiments may be one ofvarious types of electronic devices. The electronic devices may include,for example, a portable communication device (e.g., a smartphone), acomputer device, a portable multimedia device, a portable medicaldevice, a camera, a wearable device, or a home appliance. According toan embodiment, the electronic devices are not limited to those describedabove.

It should be appreciated that various embodiments of the presentdisclosure and the terms used therein are not intended to limit thetechnological features set forth herein to particular embodiments andinclude various changes, equivalents, or replacements for acorresponding embodiment. With regard to the description of thedrawings, similar reference numerals may be used to refer to similar orrelated elements. It is to be understood that a singular form of a nouncorresponding to an item may include one or more of the things, unlessthe relevant context clearly indicates otherwise. As used herein, eachof such phrases as “A or B,” “at least one of A and B,” “at least one ofA or B,” “A, B, or C,” “at least one of A, B, and C,” and “at least oneof A, B, or C,” may include any one of, or all possible combinations ofthe items enumerated together in a corresponding one of the phrases. Asused herein, such terms as “1st” and “2nd,” or “first” and “second” maybe used to simply distinguish a corresponding component from another,and does not limit the components in other aspect (e.g., importance ororder). It is to be understood that if an element (e.g., a firstelement) is referred to, with or without the term “operatively” or“communicatively”, as “coupled with,” “coupled to,” “connected with,” or“connected to” another element (e.g., a second element), it means thatthe element may be coupled with the other element directly (e.g.,wiredly), wirelessly, or via at least a third element.

As used herein, the term “module” may include a unit implemented inhardware, software, or firmware, and may interchangeably be used withother terms, for example, “logic,” “logic block,” “part,” or“circuitry”. A module may be a single integral component, or a minimumunit or part thereof, adapted to perform one or more functions. Forexample, according to an embodiment, the module may be implemented in aform of an application-specific integrated circuit (ASIC).

Various embodiments as set forth herein may be implemented as software(e.g., the program 140) including one or more instructions that arestored in a storage medium (e.g., internal memory 136 and/or externalmemory 138) that is readable by a machine (e.g., the electronic device101). For example, a processor (e.g., the processor 120) of the machine(e.g., the electronic device 101) may invoke at least one of the one ormore instructions stored in the storage medium, and execute it, with orwithout using one or more other components under the control of theprocessor. This allows the machine to be operated to perform at leastone function according to the at least one instruction invoked. The oneor more instructions may include a code generated by a complier or acode executable by an interpreter. The machine-readable storage mediummay be provided in the form of a non-transitory storage medium. Wherein,the term “non-transitory” simply means that the storage medium is atangible device, and does not include a signal (e.g., an electromagneticwave), but this term does not differentiate between where data issemi-permanently stored in the storage medium and where the data istemporarily stored in the storage medium.

According to an embodiment, a method according to various embodiments ofthe disclosure may be included and provided in a computer programproduct. The computer program product may be traded as a product betweena seller and a buyer. The computer program product may be distributed inthe form of a machine-readable storage medium (e.g., compact disc readonly memory (CD-ROM)), or be distributed (e.g., downloaded or uploaded)online via an application store (e.g., PlayStore™), or between two userdevices (e.g., smart phones) directly. If distributed online, at leastpart of the computer program product may be temporarily generated or atleast temporarily stored in the machine-readable storage medium, such asmemory of the manufacturer's server, a server of the application store,or a relay server.

According to various embodiments, each component (e.g., a module or aprogram) of the above-described components may include a single entityor multiple entities. According to various embodiments, one or more ofthe above-described components may be omitted, or one or more othercomponents may be added. Alternatively or additionally, a plurality ofcomponents (e.g., modules or programs) may be integrated into a singlecomponent. In such a case, according to various embodiments, theintegrated component may still perform one or more functions of each ofthe plurality of components in the same or similar manner as they areperformed by a corresponding one of the plurality of components beforethe integration. According to various embodiments, operations performedby the module, the program, or another component may be carried outsequentially, in parallel, repeatedly, or heuristically, or one or moreof the operations may be executed in a different order or omitted, orone or more other operations may be added.

What is claimed is:
 1. An electronic device comprising: a magneticsensor; and at least one processor operatively connected with themagnetic sensor, wherein the at least one processor is configured to:collect multiple pieces of path data based on at least first magneticdata related to multiple movements of the electronic device, via atleast the magnetic sensor; identify multiple pieces of second magneticdata, which are similar to each other at a predetermined level orhigher, from among the multiple pieces of path data; determine an arearange, in which the multiple pieces of second magnetic data arecollected, to be an intersection area related to the multiple movementsof the electronic device; determine a first space and a second spacerelated to the multiple movements of the electronic device based on atleast the intersection area; and determine a space, in which theelectronic device is located, among the first space and the second spacebased on at least third magnetic data acquired via the magnetic sensor.2. The electronic device of claim 1, wherein the at least one processoris further configured to group multiple pieces of fourth magnetic datahaving mutually identical and/or similar first distributioncharacteristics with reference to the multiple pieces of second magneticdata among the multiple pieces of path data, and group multiple piecesof fifth magnetic data having mutually identical and/or similar seconddistribution characteristics, different from the first distributioncharacteristics, with reference to the multiple pieces of secondmagnetic data among the multiple pieces of path data.
 3. The electronicdevice of claim 2, wherein the at least one processor is furtherconfigured to determine an area range, in which the multiple pieces offourth magnetic data are collected, to be the first space in adesignated indoor space related to the collection of the multiple piecesof path data, and determine an area range, in which the multiple piecesof fifth magnetic data are collected, to be the second space within thedesignated indoor space.
 4. The electronic device of claim 2, whereinthe at least one processor is further configured to collect the firstmagnetic data at each of multiple points on a path corresponding to adesignated time interval, with regard to each of multiple pathsregarding multiple movements of the electronic device, and generate avirtual marker for a point on the path, on which the first magnetic datahas been collected, by using at least the first magnetic data.
 5. Theelectronic device of claim 4, wherein the at least one processor isfurther configured to generate a first index for the first spaceincluding multiple first virtual markers generated based on at least themultiple pieces of fourth magnetic data, and generate a second index forthe second space including multiple second virtual markers generatedbased on at least the multiple pieces of fifth magnetic data.
 6. Theelectronic device of claim 5, wherein the at least one processor isfurther configured to compare the third magnetic data with at least oneof the multiple first virtual markers and the multiple second virtualmarkers.
 7. The electronic device of claim 6, wherein the at least oneprocessor is further configured to determine a space, in which theelectronic device is located, to be the first space when the thirdmagnetic data is similar to at least one of the multiple first virtualmarkers at a designated level or higher, and determine a space, in whichthe electronic device is located, to be the second space when the thirdmagnetic data is similar to at least one of the multiple second virtualmarkers at a predetermined level or higher.
 8. A positioning method byan electronic device, the positioning method comprising: collectingmultiple pieces of path data based on at least first magnetic datarelated to multiple movements of the electronic device by using at leasta magnetic sensor; identifying multiple pieces of second magnetic data,which are similar to each other at a predetermined level or higher, fromamong the multiple pieces of path data; determining an area range, inwhich the multiple second magnetic data are collected, to be anintersection area related to the multiple movements of the electronicdevice; determining a first space and a second space related to themultiple movements of the electronic device based on at least theintersection area; and determining a space, in which the electronicdevice is located, among the first space and the second space based onat least third magnetic data acquired using at least the magneticsensor.
 9. The positioning method of claim 8, wherein the determining ofthe first space and the second space comprises: grouping multiple piecesof fourth magnetic data having mutually identical and/or similar firstdistribution characteristics with reference to the multiple pieces ofsecond magnetic data among the multiple pieces of path data; andgrouping multiple pieces of fifth magnetic data having mutuallyidentical and/or similar second distribution characteristics, differentfrom the first distribution characteristics, with reference to themultiple pieces of second magnetic data among the multiple pieces ofpath data.
 10. The positioning method of claim 9, wherein thedetermining of the first space and the second space further comprises:determining an area range, in which the multiple pieces of fourthmagnetic data are collected, to be the first space in a designatedindoor space related to the collection of the multiple pieces of pathdata; and determining an area range, in which the multiple pieces offifth magnetic data are collected, to be the second space within thedesignated indoor space.
 11. The positioning method of claim 9, whereinthe collecting of multiple pieces of path data based on at least thefirst magnetic data comprises: collecting the first magnetic data ateach of multiple points on a path corresponding to a designated timeinterval, with regard to each of multiple paths regarding the multiplemovements of the electronic device; and generating a virtual marker fora point on the path, on which the first magnetic data has beencollected, by using at least the first magnetic data.
 12. Thepositioning method of claim 11, wherein the generating of the virtualmarker comprises: generating a first index for the first space includingmultiple first virtual markers generated using at least the multiplepieces of fourth magnetic data; and generating a second index for thesecond space including multiple second virtual markers generated usingat least the multiple pieces of fifth magnetic data.
 13. The positioningmethod of claim 12, wherein the determining of a space in which theelectronic device is located comprises comparing the third magnetic datawith at least one of the multiple first virtual markers and the multiplesecond virtual markers.
 14. The positioning method of claim 13, whereinthe determining of a space in which the electronic device is locatedfurther comprises: determining a space, in which the electronic deviceis located, to be the first space when the third magnetic data issimilar to at least one of the multiple first virtual markers at adesignated level or higher; and determining a space, in which theelectronic device is located, to be the second space when the thirdmagnetic data is similar to at least one of the multiple second virtualmarkers at a predetermined level or higher.
 15. The positioning methodof claim 8, wherein the collecting of multiple pieces of path data basedon the first magnetic data comprises: outputting a graphic userinterface including a geographic layout for a designated indoor space,by using at least a display device; and receiving, through the graphicuser interface, a first user input for designating multiple zones forcollection of the multiple pieces of path data within the designatedindoor space, and wherein the determining of the first space and thesecond space comprises: displaying the first space and the second spaceon the graphic user interface, by using at least the display device; andreceiving a second user input related to user confirmation of the firstspace and the second space through the graphic user interface.
 16. Theelectronic device of claim 4, wherein the at least one processor isfurther configured to generate the virtual marker by using a directionvalue of a magnetic field included in the first magnetic data.
 17. Theelectronic device of claim 1, wherein the electronic device furthercomprising: a display device; and a memory in which an application forsupporting a location-based service is stored, wherein the at least oneprocessor is further configured to: output a graphic user interface ofthe application including a geographic layout for a designated indoorspace, by using the display device, and receive, through the graphicuser interface, a first user input for designating multiple zones forcollection of the multiple pieces of path data within the designatedindoor space.
 18. The electronic device of claim 17, wherein the atleast one processor is further configured to display the first space andthe second space on the graphic user interface, by using the displaydevice, receive a second user input related to user confirmation of thefirst space and the second space through the graphic user interface, anddetermine the first space and the second space in response to receivingthe second user input.
 19. The electronic device of claim 17, whereinthe at least one processor is further configured to display a list of atleast one event to be provided when the electronic device is determinedas being located in the first space or the second space, by using thedisplay device, and in response to a third user input to the list,determine an event corresponding to the first space or the second space.20. The electronic device of claim 17, wherein the electronic devicefurther comprising: at least one of an acceleration sensor and a gyrosensor, wherein the at least one processor is further configured to:when the movement of the electronic device is detected in at least oneof the multiple zones by using at least one of the acceleration sensorand the gyro sensor, collect path data regarding a path on which theelectronic device moves from a first time point at which the movement isdetected to a second time point at which the detection of movementterminates.